﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MT010 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagDefinition U0003;
    private static SwiftTagSubItemDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;

    [Description("MIR of the undelivered message")]
    public Tag106 MessageInputReference_106
    {
      get
      {
        return new Tag106((SwiftElement) this, 0, (SwiftDefinitionElement) MT010.U0002);
      }
    }

    [Description("MIR of the undelivered message")]
    public Tag106 Tag106_MessageInputReference
    {
      get
      {
        return this.MessageInputReference_106;
      }
    }

    [Description("MUR")]
    public Tag108 MessageUserReference_108
    {
      get
      {
        return new Tag108((SwiftElement) this, 0, (SwiftDefinitionElement) MT010.U0003);
      }
    }

    [Description("MUR")]
    public Tag108 Tag108_MessageUserReference
    {
      get
      {
        return this.MessageUserReference_108;
      }
    }

    [Description("Message status")]
    public Tag431 MessageStatus_431
    {
      get
      {
        return new Tag431((SwiftElement) this, 0, (SwiftDefinitionElement) MT010.U0005);
      }
    }

    [Description("Message status")]
    public Tag431 Tag431_MessageStatus
    {
      get
      {
        return this.MessageStatus_431;
      }
    }

    [Description("LT code and branch code, to which the undelivered message was sent.")]
    public Tag102 SwiftAddress_102
    {
      get
      {
        return new Tag102((SwiftElement) this, 0, (SwiftDefinitionElement) MT010.U0007);
      }
    }

    [Description("LT code and branch code, to which the undelivered message was sent.")]
    public Tag102 Tag102_SwiftAddress
    {
      get
      {
        return this.SwiftAddress_102;
      }
    }

    [Description("Message Priority")]
    public Tag104 MessagePriority_104
    {
      get
      {
        return new Tag104((SwiftElement) this, 0, (SwiftDefinitionElement) MT010.U000E);
      }
    }

    [Description("Message Priority")]
    public Tag104 Tag104_MessagePriority
    {
      get
      {
        return this.MessagePriority_104;
      }
    }

    public MT010()
      : base(true)
    {
    }

    public MT010(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT010.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT010.MessageDefinition = new SwiftMessageDefinition("MT010", "Non-Delivery Warning");
      MT010.U0002 = new SwiftTagDefinition("MessageInputReference_106", "MIR of the undelivered message");
      MT010.U0002.TagName = "{106:";
      MT010.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT010.U0002);
      MT010.U0003 = new SwiftTagDefinition("MessageUserReference_108", "MUR");
      MT010.U0003.TagName = "{108:";
      MT010.U0003.Mandatory = false;
      MT010.U0004 = new SwiftTagSubItemDefinition("MessageUserReference", "Mur");
      MT010.U0003.Elements.Add((SwiftDefinitionElement) MT010.U0004);
      MT010.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT010.U0003);
      MT010.U0005 = new SwiftTagDefinition("MessageStatus_431", "Message status");
      MT010.U0005.TagName = "{431:";
      MT010.U0006 = new SwiftTagSubItemDefinition("MessageStatus", "Message status");
      MT010.U0005.Elements.Add((SwiftDefinitionElement) MT010.U0006);
      MT010.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT010.U0005);
      MT010.U0007 = new SwiftTagDefinition("SwiftAddress_102", "LT code and branch code, to which the undelivered message was sent.");
      MT010.U0007.TagName = "{102:";
      MT010.U0008 = new SwiftTagSubItemDefinition("SwiftAddress", "SWIFT Address");
      MT010.U0007.Elements.Add((SwiftDefinitionElement) MT010.U0008);
      MT010.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT010.U0007);
      MT010.U000E = new SwiftTagDefinition("MessagePriority_104", "Message Priority");
      MT010.U000E.TagName = "{104:";
      MT010.U000F = new SwiftTagSubItemDefinition("MessagePriority", "Message Priority");
      MT010.U000E.Elements.Add((SwiftDefinitionElement) MT010.U000F);
      MT010.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT010.U000E);
    }
  }
}
